package com.etc.service.impl;

import java.util.List;

import com.etc.dao.ManagerDao;
import com.etc.dao.impl.ManagerDaoImpl;
import com.etc.entity.Manager;
import com.etc.entity.PageModel;
import com.etc.entity.Person;
import com.etc.service.ManagerService;

public class ManagerServiceImpl implements ManagerService {
	private ManagerDao managerDao = new ManagerDaoImpl();

	public List<Person> findByAccount(String account) {
		return managerDao.findByAccount(account);
	}

	public List<Person> queryAll() {
		return managerDao.queryAll();
				}

	public boolean checkAccount(String account,String pwd) {
		return managerDao.checkAccount(account,pwd);
	}
	public void modifyBalance(int id,double balance){
		 managerDao.modifyBalance(id, balance);
	}
	public void removeUser(int id) {
		managerDao.removeUser(id);
	}

	@Override
	public int getUserCount() {
		return managerDao.getUserCount();
	}

	@Override
	public List<Person> getPersonListByPage(int currentPage, int pageSize) {
		// TODO Auto-generated method stub
		return managerDao.getPersonListByPage(currentPage, pageSize);
	}

	@Override
	public PageModel<Person> getPageModelListByPage(int currentPage,
			int pageSize, int totalRecord) {
		// TODO Auto-generated method stub
		return managerDao.getPageModelListByPage(currentPage, pageSize, totalRecord);
	}
	


}
